package ee.videorentalstore.bonustracker;

import ee.videorentalstore.users.types.Customer;

public class CustomerAndItsBonusPoints 
{
	private Customer customer;
	private int bonusPoints = 0;
	
	
	@Override
	public int hashCode() 
	{
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((customer == null) ? 0 : customer.hashCode());
		return result;
	}

	
	@Override
	public boolean equals(Object obj) 
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CustomerAndItsBonusPoints other = (CustomerAndItsBonusPoints) obj;
		if (customer == null) {
			if (other.customer != null)
				return false;
		} else if (!customer.equals(other.customer))
			return false;
		return true;
	}

	public Customer getCustomer()
	{
		return customer;
	}
	
	public void setCustomer(Customer customer) 
	{
		this.customer = customer;
	}
	
	public int getBonusPoints() 
	{
		return bonusPoints;
	}
	
	public void setBonusPoints(int bonusPoints) 
	{
		this.bonusPoints = bonusPoints;
	}
}
